In [1]:
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
sns.set_style('whitegrid')
In [2]:
from hybridpy.learning import dynamicprogramming
from hybridpy.dataset import triploader
In [3]:
In [4]:
In [24]:
trip = triploader.load('/Users/astyler/projects/ChargeCarData/thor/thor20100305_1.csv')
controls = [0, 5000, 10000, 15000, 20000, 25000, 40000]
v, q, p, tp = dynamicprogramming.compute(trip=trip, controls=controls, soc_states=100)
In [25]:
plt.figure(figsize=(10,8))
sns.heatmap(v.T[::-1], linewidth=0, robust=True, cmap='RdBu_r')
Out[25]:
In [8]:
plt.plot(v.T[0:10].T)
Out[8]:
maybe interp1d with a inf in y values, one inf at 1137, and all before are now NAN, including at other SOCS. no at 1136, 0 is nan but full soc still has value
one nan at the bottom is back propping up, ~1 soc per timestep from interpolation
check interp1d with nan values... check min q t is correct?
In [13]:
from scipy.signal import butter, filtfilt
import numpy as np
In [23]:
plt.subplot(111)
plt.plot(trip.Acceleration)
plt.figure(figsize=(12,8))
#plt.plot(trip.Power)
plt.plot(p)
Out[23]:
In [ ]: